/*
 *************************************************************************
 *西瑞克斯研发管理系统
 *版 本: 1.0   
 *日 期：02/07/2012    
 *作 者： 王浩 QQ：873987060   
 *************************************************************************   
 */

package com.application.yfmaterieldepart.struts.form;

import org.apache.commons.lang.builder.ReflectionToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import java.util.List;
import com.manager.commons.StringUtil;
import com.application.yfmaterieldepart.entity.YfMaterielDepart;
import java.util.Date;

/**
 * 
 * Description: YfMaterielDepartForm Struts Action Form<br />
 * 
 * Version:V0.1<br />
 * 
 * Author: 王浩 QQ：873987060 <br />
 * 
 * History: <br />
 * 
 * 02/07/2012 .
 * 
 */
public class YfMaterielDepartForm extends ActionForm {

	/** serialVersionUID */
	protected static final long serialVersionUID = -1L;

	public YfMaterielDepartForm() {

	}

	private String id;

	private String projectNo;

	private String madename;

	private Float price;

	private Long count;

	private Date purchase;

	private String vender;

	private String provider;

	private String linkman;

	private String linkphone;

	private Long type;

	private String operateid;

	private Date createDate;

	private String ids;

	private Long initiateYear;
	private String purchaseStr;
	
	private String projectOrg;
	
	private String projectName;
	

	public String getProjectName() {
		return projectName;
	}

	public void setProjectName(String projectName) {
		this.projectName = projectName;
	}

	public String getProjectOrg() {
		return projectOrg;
	}

	public void setProjectOrg(String projectOrg) {
		this.projectOrg = projectOrg;
	}

	/**
	 * @return Returns the Purchase.
	 */
	public String getPurchaseStr() {
		String re = "";
		if (this.purchase == null) {
			return re;
		}
		try {
			re = StringUtil.dateToString(this.purchase);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return re;
	}

	/**
	 * @param ${field.propertyName}
	 *            Set the ${field.propertyName}.
	 */
	public void setPurchaseStr(String purchaseStr) {
		this.purchaseStr = purchaseStr;
		if (this.purchaseStr != null && !"".equals(this.purchaseStr)) {
			try {
				this.purchase = StringUtil.stringToDate(this.purchaseStr);
			} catch (Exception e) {
				e.printStackTrace();
			}
		}

	}

	/**
	 * @return Returns the Id
	 */
	public String getId() {
		return this.id;
	}

	/**
	 * @param id
	 *            Set the id.
	 */
	public void setId(String id) {
		this.id = id;
	}

	/**
	 * @return Returns the ProjectNo
	 */
	public String getProjectNo() {
		return this.projectNo;
	}

	/**
	 * @param projectNo
	 *            Set the projectNo.
	 */
	public void setProjectNo(String projectNo) {
		this.projectNo = projectNo;
	}

	/**
	 * @return Returns the Madename
	 */
	public String getMadename() {
		return this.madename;
	}

	/**
	 * @param madename
	 *            Set the madename.
	 */
	public void setMadename(String madename) {
		this.madename = madename;
	}

	/**
	 * @return Returns the Price
	 */
	public Float getPrice() {
		return this.price;
	}

	/**
	 * @param price
	 *            Set the price.
	 */
	public void setPrice(Float price) {
		this.price = price;
	}

	/**
	 * @return Returns the Count
	 */
	public Long getCount() {
		return this.count;
	}

	/**
	 * @param count
	 *            Set the count.
	 */
	public void setCount(Long count) {
		this.count = count;
	}

	/**
	 * @return Returns the Purchase
	 */
	public Date getPurchase() {
		return this.purchase;
	}

	/**
	 * @param purchase
	 *            Set the purchase.
	 */
	public void setPurchase(Date purchase) {
		this.purchase = purchase;
	}

	/**
	 * @return Returns the Vender
	 */
	public String getVender() {
		return this.vender;
	}

	/**
	 * @param vender
	 *            Set the vender.
	 */
	public void setVender(String vender) {
		this.vender = vender;
	}

	/**
	 * @return Returns the Provider
	 */
	public String getProvider() {
		return this.provider;
	}

	/**
	 * @param provider
	 *            Set the provider.
	 */
	public void setProvider(String provider) {
		this.provider = provider;
	}

	/**
	 * @return Returns the Linkman
	 */
	public String getLinkman() {
		return this.linkman;
	}

	/**
	 * @param linkman
	 *            Set the linkman.
	 */
	public void setLinkman(String linkman) {
		this.linkman = linkman;
	}

	/**
	 * @return Returns the Linkphone
	 */
	public String getLinkphone() {
		return this.linkphone;
	}

	/**
	 * @param linkphone
	 *            Set the linkphone.
	 */
	public void setLinkphone(String linkphone) {
		this.linkphone = linkphone;
	}

	/**
	 * @return Returns the Type
	 */
	public Long getType() {
		return this.type;
	}

	/**
	 * @param type
	 *            Set the type.
	 */
	public void setType(Long type) {
		this.type = type;
	}

	/**
	 * @return Returns the Operateid
	 */
	public String getOperateid() {
		return this.operateid;
	}

	/**
	 * @param operateid
	 *            Set the operateid.
	 */
	public void setOperateid(String operateid) {
		this.operateid = operateid;
	}

	/**
	 * @return Returns the CreateDate
	 */
	public Date getCreateDate() {
		return this.createDate;
	}

	/**
	 * @param createDate
	 *            Set the createDate.
	 */
	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	private List<YfMaterielDepart> yfMaterielDepartList;

	/**
	 * @return the yfmaterieldepartformList
	 */
	public List<YfMaterielDepart> getYfMaterielDepartList() {
		return yfMaterielDepartList;
	}

	/**
	 * @param yfMaterielDepartList
	 *            the yfmaterieldepartformList to set
	 */
	public void setYfMaterielDepartList(
			List<YfMaterielDepart> yfMaterielDepartList) {
		this.yfMaterielDepartList = yfMaterielDepartList;
	}

	public String getIds() {
		return ids;
	}

	public void setIds(String ids) {
		this.ids = ids;
	}

	/**
	 * Method validate
	 * 
	 * @param mapping
	 * @param request
	 * @return ActionErrors
	 */
	public ActionErrors validate(ActionMapping mapping,
			HttpServletRequest request) {
		// TODO Auto-generated method stub
		return null;
	}

	/**
	 * Method reset
	 * 
	 * @param mapping
	 * @param request
	 */
	public void reset(ActionMapping mapping, HttpServletRequest request) {
		// TODO Auto-generated method stub
	}

	public String toString() {
		return ReflectionToStringBuilder.toString(this,
				ToStringStyle.MULTI_LINE_STYLE);
	}

	public Long getInitiateYear() {
		return initiateYear;
	}

	public void setInitiateYear(Long initiateYear) {
		this.initiateYear = initiateYear;
	}
}
